﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ${USER}
  Date: ${DATE}
  Time: ${TIME}
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%= basePath %>"/>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/html5shiv.js"></script>
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/respond.min.js"></script>
<![endif]-->
    <link rel="stylesheet" type="text/css" href="<%= basePath %>static/backstage/static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="<%= basePath %>static/backstage/static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="<%= basePath %>static/backstage/lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css"
          href="<%= basePath %>static/backstage/static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="<%= basePath %>static/backstage/static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" href="<%= basePath %>static/backstage/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css"
          type="text/css">
    <!--[if IE 6]>
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>商品分类</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="olalashop/sysAccountApi/index">首页</a> <span
        class="c-gray en">&gt;</span> 商品分类 <span
        class="c-gray en">&gt;</span> 商品分类管理 <a class="btn btn-success radius r"
                                                style="line-height:1.6em;margin-top:3px"
                                                href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <input type="text" class="input-text" placeholder="请输入类别名称" style="width:250px">
        <button type="submit" class="btn btn-success radius">
            <i class="Hui-iconfont">&#xe665;</i>
            搜分类
        </button>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l">
			<a href="javascript:;" onclick="cate_add(${categoryList[0].parentId})"
               class="btn btn-primary radius">
				<i class="Hui-iconfont">&#xe600;</i> 添加分类</a></span>
        <span class="r">共有数据：<strong>${categoryList.size()}</strong> 条</span>
    </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="5%"><input type="checkbox" id="checkAll" name="checkAll" value=""></th>
                <th width="5%">分类ID</th>
                <th width="10%">分类名称</th>
                <th width="10%">是否展示</th>
                <th width="10%">是否有效</th>
                <th width="20%">操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${categoryList}" var="cate">
                <tr>
                    <td><input type="checkbox" id="username1" value="1" name=""></td>
                    <td>${cate.categoryId}</td>
                    <td>${cate.categoryName}</td>
                    <td>
                        <c:choose>
                            <c:when test="${cate.isShow==1}">
                                <span><h5>展示</h5></span>
                            </c:when>
                            <c:otherwise>
                                <span><h5>不展示</h5></span>
                            </c:otherwise>
                        </c:choose>
                    </td>
                    <td>
                        <c:choose>
                            <c:when test="${cate.isEnable==1}">
                                <span><h5>有效</h5></span>
                            </c:when>
                            <c:otherwise>
                                <span><h5>无效</h5></span>
                            </c:otherwise>
                        </c:choose>
                    </td>
                    <td>
                        <a href="editCate/${cate.categoryId}">修改</a>&nbsp;&nbsp;
                        <a href="childCate/${cate.categoryId}">子类详情</a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="<%= basePath %>static/backstage/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="<%= basePath %>static/backstage/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript"
        src="<%= basePath %>static/backstage/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<%= basePath %>static/backstage/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    function cate_add(pid) {
        window.location.href = "addCategoryPage/" + pid
    }
</script>
</body>
</html>